package course.com.itheima8;

public class Test {
    public static void main(String[] args) {
        getDog(new Cat());
        getDog(new Dog());




    }

    public static void getDog(Animal animal){
        animal.eat();

        if (animal instanceof Dog) {
            Dog dog = (Dog) animal;
            dog.lookHome();
        }
    }
}

